<local:DocumentBase x:Class="WPFExcelReport.YCAFSACC"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
                     
                    xmlns:wep="clr-namespace:WPFExcelReport" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    Loaded="Window_Loaded" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    FontSize="14" 
                    Background="White"  
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:MaskPrice  x:Key="dprice"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:Divideby10000  x:Key="d10000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetQP" />
        <CollectionViewSource   x:Key="vwFSACC" Source="{Binding Path=ICC_FSACC,Source={StaticResource SetData}}" />        
    </local:DocumentBase.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*" MinHeight="300"></RowDefinition> 
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions> 
            <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">               
                    <WrapPanel  >
                    <Label Content="{Binding Source={Localization:Translate Word=类型}}"    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                    <TextBox Name="txtTYPE" Width="54" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="2"
                                  KeyUp="txtART_KeyUp" Background="Pink" MaxLength="4" FontSize="18" Foreground="#FF141111" Height="33" >ACC</TextBox>
                    <Label Content="{Binding Source={Localization:Translate Word=辅料编号}}"    Width="91" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                        <TextBox Name="txtARTICLE" Width="170" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="1"
                         Focusable="True" KeyUp="txtART_KeyUp" Background="YellowGreen" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                    <Label Content="{Binding Source={Localization:Translate Word=大类}}"    Width="52" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                        <TextBox Name="txtPRDGRP" Width="62" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="3"
                             KeyUp="txtART_KeyUp" Background="Pink" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
                        <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnQuery" Click="btnQuery_Click" KeyboardNavigation.TabIndex="6" IsDefault="True" TabIndex="13">
                            <Button.Background>
                                <ImageBrush ImageSource="Images/Search.png" />
                            </Button.Background>
                        </Button>
                        <Button Content="{Binding Source={Localization:Translate Word=EXCEL}}" Margin="20,0,0,0" Name="btnReport" Width="47" Click="btnReport_Click" TabIndex="7" />

                </WrapPanel>
            </StackPanel>
        <DockPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"  LastChildFill="True"> 
            <DataGrid  AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwFSACC}}"  
                              HeadersVisibility="Column"
                              x:Name="MasterDg"    
                              Height="Auto" FontSize="14" FontFamily ="Times New Roman"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" >
                        <!-- , Converter={StaticResource ResourceKey=gb2312}-->
                        <!-- FSART,FSABEZ,FSPROGRP,DES,FSARTGRP,PRDGRP,ISIZE,PRICE,FELIEFNR,SUPPLIER-->
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=FSART}" Header="{Binding Source={Localization:Translate Word=辅料编号}}" Width="SizeToCells" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=FSABEZ}" Header="{Binding Source={Localization:Translate Word=辅料描述}}" Width="SizeToCells" MinWidth="50" />
                            <DataGridTextColumn Binding="{Binding Path=FSPROGRP}" Header="{Binding Source={Localization:Translate Word=类型}}" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=DES}" Header="{Binding Source={Localization:Translate Word=类型描述}}" Width="SizeToCells" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=FSARTGRP}" Header="{Binding Source={Localization:Translate Word=大类}}" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=PRDGRP}" Header="{Binding Source={Localization:Translate Word=大类描述}}" Width="SizeToCells" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=COLOR}" Header="{Binding Source={Localization:Translate Word=辅料颜色}}" Width="SizeToCells" MinWidth="30" MaxWidth="150"/>
                            <DataGridTextColumn Binding="{Binding Path=ISIZE}" Header="{Binding Source={Localization:Translate Word=辅料规格}}" Width="SizeToCells" MinWidth="30" MaxWidth="150"/>
                            <DataGridTextColumn Binding="{Binding Path=LPRICE}" Header="{Binding Source={Localization:Translate Word=单价}}" Width="SizeToCells" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=LSNAME}" Header="{Binding Source={Localization:Translate Word=供应商}}" Width="SizeToCells" MinWidth="30"/>
                        </DataGrid.Columns>
                    </DataGrid >  
        </DockPanel>     
    </Grid>
</local:DocumentBase>
